import {combineReducers} from 'redux';
import {SET_USER_INFO} from './actions';

const initState = {
  userInfo: '',
};
const $userInfo = (state = initState, action) => {
  switch (action.type) {
    case SET_USER_INFO:
      return {...state, ...action.userInfo};
    default:
      return state;
  }
};

const reducers = combineReducers({
  $userInfo,
});

export default reducers;
